import { defineStore } from 'pinia';
import { getProductList } from '../api/ProductService.js';

export const useProductStore = defineStore('product', {
  state: () => ({
    products: [],
  }),
  actions: {
    async fetchProducts() {
      // 实现从 API 或其他数据源获取产品列表的逻辑
      // 以下是模拟数据的示例
     this.products = await getProductList();
    },
  },
});
